Hi, |
Re: Exporting OLE objets
Hi,
Sub ExpandOleWord()
'
' Macro enregistrée le 28/04/2010
'
Dim colIS As InlineShapes
Dim itemIS As InlineShape
Dim StrWd As String
StrWd = ActiveDocument.Name
Set colIS = ActiveDocument.InlineShapes
If colIS.Count >= 1 Then
For Each itemIS In colIS
Select Case itemIS.Type
Case wdInlineShapeEmbeddedOLEObject
If InStr(1, itemIS.OLEFormat.ClassType, "Word") 0 Then
itemIS.OLEFormat.Open
itemIS.OLEFormat.Activate
Selection.WholeStory
Selection.Copy
Documents(StrWd).Activate
Selection.PasteAndFormat (wdFormatOriginalFormatting)
End If
Case wdInlineShapeHorizontalLine
'itemIS.OLEFormat.Edit
Case wdInlineShapeLinkedOLEObject
'itemIS.OLEFormat.Edit
Case wdInlineShapeLinkedPicture
'itemIS.OLEFormat.Edit
Case wdInlineShapeLinkedPictureHorizontalLine
'itemIS.OLEFormat.Edit
Case wdInlineShapeOLEControlObject
'itemIS.OLEFormat.Edit
Case wdInlineShapeOWSAnchor
'itemIS.OLEFormat.Edit
Case wdInlineShapePicture
'itemIS.Activate
Case wdInlineShapePictureBullet
'itemIS.OLEFormat.Edit
Case wdInlineShapePictureHorizontalLine
'itemIS.OLEFormat.Edit
Case wdInlineShapeScriptAnchor
'itemIS.OLEFormat.Edit
End Select
Next
End If
End Sub
|
Re: Exporting OLE objets Thanks very much for your help. I modified the VBA code to enhance it a little bit and that works fine. As I don't want to run my dxl export and then the VBA on word, is it possible to launch the VBA code from the dxl ? And one other question : when a DOORS object contains an OLE object (for exemple a Word document), how can I do to have a new Word document opening, instead of a Word document embedded in the DOORS view ? Best regards |